home *** CD-ROM | disk | FTP | other *** search
- function CommaDelimStrToTrect(const s: string): trect;
- var
- tmp, wrkstr : string;
- begin
- if pos(æ"Æ, s) <> 0 then
- {strip the double quotes, if present}
- tmp := stripsymbol(s, æ"Æ)
- else
- tmp := s;
- wrkstr := get_Word_UpTo(tmp, æ,Æ);
- result.left := strToInt(wrkstr);
- wrkstr := get_nth_word(tmp, 2, [æ,Æ]);
- result.top := StrToInt(wrkstr);
- wrkstr := get_nth_word(tmp, 3, [æ,Æ]);
- result.right := StrToInt(wrkstr);
- wrkstr := get_nth_word(tmp, 4, [æ,Æ]);
- result.bottom := strToInt(wrkstr);
- end;
-
- function StripSymbol(const s, sym: string): string;
- {takes out any occurrences of symbol}
- begin
- result := s;
- while pos(sym,result) <> 0 do
- result := copy(result, 1, pos(sym,result)-1) +
- copy(result, pos(sym, result)+1, 255);
- end;
-